/*
 * @Author: xuyunke xyk18697347312@163.com
 * @Date: 2025-03-19 17:10:54
 * @LastEditors: xuyunke xyk18697347312@163.com
 * @LastEditTime: 2025-03-21 10:28:44
 * @FilePath: \jeecgvue3\jeecgboot-vue3\src\views\system\space\depart.data.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { FormSchema } from '/@/components/Form';

// 部门基础表单
export function useBasicFormSchema() {
  const basicFormSchema: FormSchema[] = [
    {
      field: 'spaceName',
      label: '空间名称',
      component: 'Input',
      componentProps: {
        placeholder: '请输入空间名称',
      },
      rules: [{ required: true, message: '空间名称不能为空' }],
    },
    {
      field: 'pid',
      label: '父级节点',
      component: 'TreeSelect',
      componentProps: {
        treeData: [],
        placeholder: '无',
        dropdownStyle: { maxHeight: '200px', overflow: 'auto' },
      },
    },
    {
      field: 'spaceType',
      label: '空间类型',
      component: 'RadioButtonGroup',
      componentProps: { options: [] },
    },
    {
      field: 'spaceArea',
      label: '空间面积',
      component: 'InputNumber',
      componentProps: {},
    },
    {
      field: 'spaceDescr',
      label: '空间描述',
      component: 'InputTextArea',
      componentProps: {
        placeholder: '请输入空间描述',
      },
    },
  ];
  return { basicFormSchema };
}

// 机构类型选项
export const orgCategoryOptions = {
  // 一级部门
  root: [
    {
      value: 1,
      label: '楼栋',
    },
  ],
  // 子级部门
  child: [
    {
      value: 2,
      label: '楼层',
    },
    {
      value: 3,
      label: '共享区域',
    },
    {
      value: 4,
      label: '办公区域',
    },
  ],
};
